#ifndef WINDOW_HPP
#define WINDOW_HPP

#include <string>
#include <SDL2/SDL.h>

namespace MA {

class Window
{
public:
	Window(int width, int height, std::string title = "");
	~Window();

	SDL_Window* getWindowPtr();
	SDL_Renderer* getRenderPtr();
	int getWindowWidth();
	int getWindowHeight();

	void setTitle(std::string title);
	void resizeWindow(int width, int height);

    void setBGColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
	void clear();
	void flush();
	void close();
/*
	const SDL_Event* updateEvent();

protected:
	virtual void onKeyDown(SDL_Keycode keycode) {}
	virtual void onKeyUp(SDL_Keycode keycode) {}
	virtual void onMouseDown(uint8_t buttonIndex, int32_t mousePosX, int32_t mousePosY) {}
	virtual void onMouseUp(uint8_t buttonIndex, int32_t mousePosX, int32_t mousePosY) {}
	virtual void onMouseMotion(SDL_MouseMotionEvent motion) {}

	virtual void onWindowQuit() {}
	virtual void onDefault(SDL_Event event) {}
*/
protected:
    static SDL_Window* m_window;
	static SDL_Renderer* m_renderer;

private:
	SDL_Event m_event;

	int m_width;
	int m_height;
};

}
#endif // WINDOW_HPP
